//
// Created by Jisam on 2024/6/30.
//
#include <bits/stdc++.h>

#define i64 long long
using namespace std;
const int N = 100 + 5;
char a[N][N];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int r, c, k;
    cin >> r >> c >> k;
    for (int i = 1; i <= r; i++) {
        for (int j = 1; j <= c; j++) {
            cin >> a[i][j];
        }
    }
    int sum = 0;
    for (int i = 1; i <= r; i++) {
        for (int j = 1; j <= c; j++) {
            if (k == 1) {
                if (a[i][j] == '.') sum++;
            }
            if (k > 1) {
                int heng = 1;
                int shu = 1;

                for (int l = i; l < i + k; l++) {
                    if (l > r || a[l][j] != '.') {
                        shu = 0;
                    }
//
                }
                for (int l = j; l < j + k; l++) {
                    if (l > c || a[i][l] != '.') {
                        heng = 0;

                    }

                }

                sum += heng + shu;
            }
        }
    }
    cout << sum << "\n";
    return 0;
}